# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=audiocd-kio
pkgver=24.02.2
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://www.kde.org/applications/multimedia/"
pkgdesc="Kioslave for accessing audio CDs"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	cdparanoia-dev
	extra-cmake-modules
	flac-dev
	kcmutils-dev
	kconfig-dev
	kdoctools-dev
	ki18n-dev
	kio-dev
	libkcddb-dev
	libkcompactdisc-dev
	libvorbis-dev
	qt6-qtbase-dev
	samurai
	"
_repo_url="https://invent.kde.org/multimedia/audiocd-kio.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/audiocd-kio-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
1da6fd53fea689dd58794a6190fc0b759feb45bc3fb2cbb0295f8f4207c59c92390341a1d78b516970e51f11c7ed79cd5feb081814ceb9c8d1107a850f29b265  audiocd-kio-24.02.2.tar.xz
"
